package xxl.robotlegs.framework.impl 
{
	import flash.system.ApplicationDomain;
	import xxl.ioc.Injector;
	import xxl.ioc.reflection.IReflector;
	import xxl.robotlegs.framework.api.IInjector;
	
	/**
	 * ...
	 * @author XXL
	 */
	public class RobotlegsInjector extends Injector implements IInjector 
	{
		
		public function RobotlegsInjector() 
		{
			
		}
		
		/* INTERFACE xxl.robotlegs.core.IInjector */
		
		public function set parent(value:IInjector):void 
		{
			this.parentInjector = value as RobotlegsInjector;
		}
		
		public function get parent():IInjector 
		{
			return this.parentInjector as RobotlegsInjector;
		}
		
		public function createChild(applicationDomain:ApplicationDomain = null):IInjector 
		{
			const childInjector:IInjector = new RobotlegsInjector();
			childInjector.applicationDomain = applicationDomain || this.applicationDomain;
			childInjector.parent = this;
			return childInjector;
		}
		
		public function get reflector():IReflector 
		{
			return _reflector;
		}
		
	}

}